import ajax from '@/utils/request.js';

// 积分
export function getOrderIntegralList(data) {
  return ajax({
    url: '/mobile/instructor/product/order/list',
    method: 'GET',
    data
  });
}

export function getCenterIntegralList(data) {
  return ajax({
    url: '/mobile/instructor/center/integralList',
    method: 'GET',
    data
  });
}

export function getIntegral() {
  return ajax({
    url: '/mobile/instructor/center/sign',
    method: 'GET',
    data
  });
}

export function getIntegralTaskList(data) {
  return ajax({
    url: '/mobile/instructor/center/taskList',
    method: 'GET',
    data
  });
}

export function getSignCount(data) {
  return ajax({
    url: '/mobile/instructor/center/signCount',
    method: 'GET',
    data
  });
}

export function setSign(data) {
	return ajax({
	  url: '/mobile/instructor/center/sign',
	  method: 'GET',
	  data
	});
}

// 积分商城
export function getProductList(data) {
	return ajax({
	  url: '/mobile/instructor/product/list',
	  method: 'GET',
	  data
	});
}
export function getProductDetail(id) {
	return ajax({
	  url: '/mobile/instructor/product/detail/' + id,
	  method: 'GET'
	});
}



export function getProductOrder(id) {
	return ajax({
	  url: '/mobile/instructor/product/order/' + id,
	  method: 'GET'
	});
}

// 苹果支付验证
export function checkApplePay(data) {
	return ajax({
	  url: '/mobile/payment/checkApplePay',
	  method: 'POST',
	  data
	});
}


// 小程序是否绑定微信
export function checkPayWxStatus(id) {
	return ajax({
	  url: '/mobile/payment/isBindOpenId',
	  method: 'GET'
	});
}

// 绑定微信
export function bindWxPay(data) {
	return ajax({
	  url: '/mobile/payment/bindWX',
	  method: 'GET',
	  data
	});
}



